function [fit]=eachfitness(x)
%fit=(sin(6*pi*x))^6;
%fit=exp(-2*log(2)*((x-.08)/0.854)^2)*( sin(5*pi*(x^0.75-0.05)))^6;
%  F3 generation
% 
% sum=0;
% for i=1:24
%     a=16*(mod(i,5)-2);
%     b=16*(fix(i/5)-2);
%     sum=sum+1/(1+i+(x(1)-a)^6+(x(2)-b)^6);
% end
% fit=500-1/(.002+sum);

%fit=(x(1)-3)^2+(x(2)+4)^2+9;

%     y=10-(x(1)-5)^2-(x(2)-2)^2;
%     fit=abs(10-y);
s=0;
valid=1;
i=1;
c={'+' '+' '#' 'a' [1.5] '*' [1.2] '#' 'a' [1.4] '-' '*' [1.4] 'a' [1.2]};
po=[5 7 10 13 15];
for i=1:length(po)
    c{po(i)}=c{po(i)}*x(2*i-1)*10^x(2*i);
end

    for i=1:100
       t=i*.1;
       yac=t^3+4*t^2+2*t-100;  
       y1(i)=yac;
       [ym,z,valid]=FunctionCompute(c,t,0,1);
       y2(i)=ym;
       s=s+((yac-ym)/300)^2;
    end

fit=s;
